
REM Make temporary folder
mkdir .\Temp

REM Copy stuff from Core
xcopy "..\EPiServer.Labs.MobilePack.Core\bin\Release\EPiServer.Labs.MobilePack.Core.dll" ".\Temp\bin\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\Images" ".\Temp\modules\MobilePack.Core\Images\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\*.aspx" ".\Temp\modules\MobilePack.Core\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\*.ascx" ".\Temp\modules\MobilePack.Core\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\*.css" ".\Temp\modules\MobilePack.Core\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\*.js" ".\Temp\modules\MobilePack.Core\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\EPiServer.Config.xmlupdate" ".\Temp\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\Web.Config.xmlupdate" ".\Temp\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\*.css" ".\Temp\modules\MobilePack.Core\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\Manifest\*.aspx" ".\Temp\modules\MobilePack.Core\Manifest\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Core\modules\MobilePack.Core\Manifest\*.ashx" ".\Temp\modules\MobilePack.Core\Manifest\" /D /S /Y

REM Copy stuff from Site
xcopy "..\EPiServer.Labs.MobilePack.Site\bin\EPiServer.Labs.MobilePack.Site.dll" ".\Temp\bin\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Site\bin\EPiCode.GoogleMapsLocation.dll" ".\Temp\bin\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Site\modules\MobilePack" ".\Temp\modules\MobilePack\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Site\EPiCode" ".\Temp\EPiCode\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Site\Setup" ".\Temp\Setup\" /D /S /Y
xcopy "..\EPiServer.Labs.MobilePack.Site\EPiServer.Labs.MobilePack.Site.csproj" ".\Temp\" /D /S /Y

REM Create Zip
7za a -r -y MobilePack.1.0.zip .\Temp\*.*

REM Rename
del MobilePack.1.0.epimodule
ren MobilePack.1.0.zip MobilePack.1.0.epimodule

REM Delete Temp folder
rd /S /Q .\Temp
